Using discomfort for speed planning in responding to tailgating vehicles for autonomous vehicles

ABSTRACT

Aspects of the disclosure relate to controlling a first vehicle in an autonomous driving mode. While doing so, a second vehicle may be identified. This vehicle may be determined to be a tailgating vehicle. An initial allowable discomfort value representing expected discomfort of an occupant of the first vehicle and expected discomfort of an occupant of the second vehicle may be identified. Determining a speed profile for a future trajectory of the first vehicle that meets the value may be attempted based on a set of factors corresponding to a reaction of the tailgating vehicle. When a speed profile that meets the value cannot be determined, the value may be adjusted until a speed profile that meets the value is determined. The speed profile that meets an adjusted value is used to control the first vehicle in the autonomous driving mode.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 16/188,619, filed Nov. 13, 2018, and is related to U.S. patentapplication Ser. No. 15/820,757, filed Nov. 22, 2017, the entiredisclosures of which are incorporated herein by reference.

BACKGROUND

Autonomous vehicles, for instance, vehicles that do not require a humandriver, can be used to aid in the transport of passengers or items fromone location to another. Such vehicles may operate in a fully autonomousmode where passengers may provide some initial input, such as a pickupor destination location, and the vehicle maneuvers itself to thatlocation, for instance, by determining and following a route which mayrequire the vehicle to respond to and interact with other road userssuch as vehicles, pedestrians, bicyclists, etc.

BRIEF SUMMARY

Aspects of the disclosure provide a method of controlling a firstvehicle. The method includes while maneuvering the first vehicle in anautonomous driving mode, identifying, by one or more processors, asecond vehicle; determining, by the one or more processors, that thesecond vehicle is a tailgating vehicle; identifying, by the one or moreprocessors, an initial allowable discomfort value representing expecteddiscomfort of an occupant of the first vehicle and expected discomfortof an occupant of the second vehicle; attempting, by the one or moreprocessors, to determine a speed profile for a future trajectory of thefirst vehicle that meets the initial allowable discomfort value based ona set of factors corresponding to a reaction of the tailgating vehicle;when a speed profile that meets the initial allowable discomfort valuecannot be determined, adjusting, by the one or more processors, theinitial allowable discomfort value until a speed profile that meets anadjusted allowable discomfort value is determined; and using, by the oneor more processors, the speed profile that meets the adjusted allowablediscomfort value to control the first vehicle in the autonomous drivingmode.

In one example, the set of factors includes a maximum alloweddeceleration for the second vehicle. In another example, the method alsoincludes, when the initial allowable discomfort value is adjusted, themaximum allowed deceleration for the second vehicle is also adjusted. Inthis example, adjusting the maximum allowed deceleration includesincreasing a limit on expected deceleration for the second vehicle. Inanother example, the set of factors includes a reaction time for thesecond vehicle. In this example, when the initial allowable discomfortvalue is adjusted, the reaction time for the second vehicle is alsoadjusted. In addition, adjusting the reaction time includes decreasingthe reaction time. In another example, the set of factors furtherincludes a constraint for stopping the first vehicle at an intersection.In this example, when the initial allowable discomfort value isadjusted, the constraint for stopping the first vehicle at anintersection is adjusted. In another example, when the initial allowablediscomfort value is adjusted, the constraint for stopping the firstvehicle at an intersection is ignored. In another example, determiningthat the second vehicle is a tailgating vehicle is based on a locationof the second vehicle with respect to the first vehicle. In thisexample, determining that the second vehicle is a tailgating vehicle isbased on a speed of the second vehicle. In another example, the methodalso includes periodically updating the determination of whether thesecond vehicle is a tailgating vehicle. In another example, the methodalso includes while maneuvering the first vehicle in an autonomousdriving mode, identifying, by one or more processors, a third vehicle;determining, by the one or more processors, that the third vehicle isnot a tailgating vehicle, and attempting to determine the speed profilefor the geometry that meets the initial allowable discomfort value isfurther based on a second set of factors relating to the third vehicle.In this example, the set of factors includes a first value for a maximumallowed deceleration for the second vehicle, and the second set offactors includes a second value for the maximum allowed deceleration forthe third vehicle, and the second value is different from the firstvalue. In addition, the first value allows for a first limit on expecteddeceleration for the second vehicle, the second value allows for asecond limit on expected deceleration for the third vehicle, and thefirst limit is less than the second limit. In addition or alternatively,the set of factors includes a first value for a reaction time for thesecond vehicle, and the second set of factors includes a second valuefor the reaction time for the third vehicle, and the second value isdifferent from the first value. In addition, the first value is lessthan the second value, such that the reaction time of the second vehicleis less than the reaction time of the third vehicle.

Another aspect of the disclosure provides a system for controlling afirst vehicle. The system comprising one or more processors configuredto, while maneuvering the first vehicle in an autonomous driving mode,identify a second vehicle; determine that the second vehicle is atailgating vehicle; identify an initial allowable discomfort valuerepresenting expected discomfort of an occupant of the first vehicle andexpected discomfort of an occupant of the second vehicle; attempt todetermine a speed profile for a future trajectory of the first vehiclethat meets the initial allowable discomfort value based on a set offactors corresponding to a reaction of the tailgating vehicle; when aspeed profile that meets the initial allowable discomfort value cannotbe determined, adjust the initial allowable discomfort value until aspeed profile that meets an adjusted allowable discomfort value isdetermined; and use the speed profile that meets the adjusted allowablediscomfort value to control the first vehicle in the autonomous drivingmode.

In one example, the one or more processors are further configured to,while maneuvering the first vehicle in an autonomous driving mode,identify a third vehicle; and determine that the third vehicle is not atailgating vehicle. In this example, attempting to determine the speedprofile for the geometry that meets the initial allowable discomfortvalue is further based on a second set of factors relating to the thirdvehicle, the set of factors includes a first value for a maximum alloweddeceleration for the second vehicle, the second set of factors includesa second value for the maximum allowed deceleration for the thirdvehicle, and the second value is different from the first value. Inanother example, the system also includes the vehicle.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional diagram of an example vehicle in accordance withan exemplary embodiment.

FIG. 2 is an example of map information in accordance with aspects ofthe disclosure.

FIG. 3 is an example external view of a vehicle in accordance withaspects of the disclosure.

FIG. 4 is a pictorial diagram of an example system in accordance with anexemplary embodiment.

FIG. 5 is a functional diagram of the system of FIG. 4 in accordancewith aspects of the disclosure.

FIG. 6 is an example bird's eye view of a geographic area in accordancewith aspects of the disclosure.

FIG. 7 is an example bird's eye view of a geographic area in accordancewith aspects of the disclosure.

FIG. 8 is an example bird's eye view of a geographic area in accordancewith aspects of the disclosure.

FIG. 9 is an example bird's eye view of a geographic area in accordancewith aspects of the disclosure.

FIG. 10 is an example bird's eye view of a geographic area in accordancewith aspects of the disclosure.

FIG. 11 is an example flow diagram in accordance with aspects of thedisclosure.

FIG. 12 is an example flow diagram in accordance with aspects of thedisclosure.

DETAILED DESCRIPTION

Overview

The technology relates to using a discomfort value to determine how tocontrol an autonomous vehicle's speed. When generating a vehicle'strajectory, the geometry of the autonomous vehicle's path may bedetermined before determining a speed profile for that trajectory. Insome instances, the autonomous vehicle's computing devices may detect anobject, such as another road user, behind the vehicle. In someinstances, these objects may be tailgating vehicles, as such, it can beimportant to consider how the vehicle's behavior will affect thesetailgating vehicles. In order to do so, a discomfort value whichsuggests discomfort for the vehicle as well as road users in thevehicle's environment, for instance, other vehicles, bicyclists, orpedestrians, may be used.

In order for the vehicle's computing devices to maneuver the vehicleautonomously, the computing devices must generate trajectories, orfuture paths for the vehicle to follow over some brief period into thefuture. These future paths may include a geometry component and a speedcomponent or speed profile. The speed profile may be generated after thegeometry component. In this regard, for any given geometry, a number ofdifferent possible speed profiles may be generated, including forinstance, those that require the vehicle to speed up or to slow down.Again, deciding which of these speed profiles to use can be a challenge.

When determining a speed profile, the computing devices may generate aplurality of constraints. These constraints may be generated based onobjects in the vehicle's environment as well as their predictedbehaviors or trajectories. In some instances, the constraints may begenerated based only on objects that are in front of and/or alongside ofthe vehicle. In that regard, objects behind the vehicle may be ignored.However, in some instances, when an object located behind the vehicle isdetermined to be a tailgating vehicle, a constraint may also begenerated for that object.

The computing devices may also attempt to determine a speed profile fora given geometry that minimizes a discomfort value for the autonomousvehicle as well as the other vehicle to identify a speed profile. Adiscomfort value may be determined based on a combination of factorsrelating to expected discomfort experienced by a passenger of theautonomous vehicle (whether or not the autonomous vehicle actuallyincludes a passenger) and a passenger or occupant of another vehicle(whether or not the another vehicle actually includes a passenger),pedestrian, or bicyclist, etc.

In other words, the computing devices may determine whether there is asolution (i.e. a speed profile) with an associated discomfort value thatwill satisfy or meet a maximum allowable discomfort value. For instance,for a given maximum allowable discomfort value, the computing devicesmay return a speed profile for that maximum allowable discomfort valueor a failure if within the limits of that maximum allowable discomfortvalue no solution can be found. This results in the computing deviceschoosing a speed plan with the lowest feasible maximum allowablediscomfort value. The computing devices may search for speed profilesiteratively using different maximum allowable discomfort values. Forinstance, the computing devices start with an initial or lowest maximumallowable discomfort value. If the computing devices are unable to finda speed profile at that maximum allowable discomfort value, thecomputing devices may increase the maximum allowable discomfort valueuntil a solution, or speed profile that meets the current maximumallowable speed discomfort value, is found.

For a given maximum allowable discomfort value, the vehicle's computingdevices may start with a speed profile that moves as fast as possiblegiven limits on velocity, such as road speed limits and lateralacceleration limits in turns, and slow regions (defined by mapinformation). This initial profile may not necessarily satisfy theconstraints, including any constraint generated for an object determinedto be tailgating vehicle. Those constraints are resolved one by one. Ifthe computing devices can't satisfy the constraints even when braking ashard and as early as possible for the maximum allowable discomfortvalue, the given maximum allowable discomfort value may be increased andnew speed profiles generated. However, if the speed profile can bothpass or yield to another vehicle at the given maximum allowablediscomfort value, the computing devices may select a default action,such as speeding up to pass the other object. In addition, as themaximum allowable discomfort value is increased, certain constraints mayeven be ignored.

The computing device may then control the vehicle according to the speedprofile that meets the smallest maximum allowable discomfort value. Thediscomfort value may be used when generating all speed profiles, but canbe especially useful when the autonomous is in certain types ofsituation which requires that the autonomous vehicle either speed up orslow down while interacting with another vehicle.

The features described herein may allow an autonomous vehicle todetermine a speed profile while considering how that speed profile willaffect both any passengers of the autonomous vehicle (even if there arecurrently none in the vehicle) as well as any passenger or occupants ofanother vehicle with which the autonomous vehicle is interacting. Inaddition, by generating constraints based on tailgating vehicles, thevehicle's computing devices are able to make driving decisions whichalso consider how the vehicle's behavior will affect those tailgatingvehicles. This also increases safety. In other words, using moreconservative estimates for predicting the behavior of other objects andusing larger safety margins at lower maximum allowable discomfort valuesresults in a safer solution.

Example Systems

As shown in FIG. 1 , a vehicle 100 in accordance with one aspect of thedisclosure includes various components. While certain aspects of thedisclosure are particularly useful in connection with specific types ofvehicles, the vehicle may be any type of vehicle including, but notlimited to, cars, trucks, motorcycles, buses, recreational vehicles,etc. The vehicle may have one or more computing devices, such ascomputing devices 110 containing one or more processors 120, memory 130and other components typically present in general purpose computingdevices.

The memory 130 stores information accessible by the one or moreprocessors 120, including instructions 134 and data 132 that may beexecuted or otherwise used by the processor 120. The memory 130 may beof any type capable of storing information accessible by the processor,including a computing device-readable medium, or other medium thatstores data that may be read with the aid of an electronic device, suchas a hard-drive, memory card, ROM, RAM, DVD or other optical disks, aswell as other write-capable and read-only memories. Systems and methodsmay include different combinations of the foregoing, whereby differentportions of the instructions and data are stored on different types ofmedia.

The instructions 134 may be any set of instructions to be executeddirectly (such as machine code) or indirectly (such as scripts) by theprocessor. For example, the instructions may be stored as computingdevice code on the computing device-readable medium. In that regard, theterms “instructions” and “programs” may be used interchangeably herein.The instructions may be stored in object code format for directprocessing by the processor, or in any other computing device languageincluding scripts or collections of independent source code modules thatare interpreted on demand or compiled in advance. Functions, methods androutines of the instructions are explained in more detail below.

The data 132 may be retrieved, stored or modified by processor 120 inaccordance with the instructions 134. For instance, although the claimedsubject matter is not limited by any particular data structure, the datamay be stored in computing device registers, in a relational database asa table having a plurality of different fields and records, XMLdocuments or flat files. The data may also be formatted in any computingdevice-readable format.

The one or more processor 120 may be any conventional processors, suchas commercially available CPUs. Alternatively, the one or moreprocessors may be a dedicated device such as an ASIC or otherhardware-based processor. Although FIG. 1 functionally illustrates theprocessor, memory, and other elements of computing devices 110 as beingwithin the same block, it will be understood by those of ordinary skillin the art that the processor, computing device, or memory may actuallyinclude multiple processors, computing devices, or memories that may ormay not be stored within the same physical housing. For example, memorymay be a hard drive or other storage media located in a housingdifferent from that of computing devices 110. Accordingly, references toa processor or computing device will be understood to include referencesto a collection of processors or computing devices or memories that mayor may not operate in parallel.

Computing devices 110 may all of the components normally used inconnection with a computing device such as the processor and memorydescribed above as well as a user input 150 (e.g., a mouse, keyboard,touch screen and/or microphone) and various electronic displays (e.g., amonitor having a screen or any other electrical device that is operableto display information). In this example, the vehicle includes aninternal electronic display 152 as well as one or more speakers 154 toprovide information or audio visual experiences. In this regard,internal electronic display 152 may be located within a cabin of vehicle100 and may be used by computing devices 110 to provide information topassengers within the vehicle 100.

Computing devices 110 may also include one or more wireless networkconnections 156 to facilitate communication with other computingdevices, such as the client computing devices and server computingdevices described in detail below. The wireless network connections mayinclude short range communication protocols such as Bluetooth, Bluetoothlow energy (LE), cellular connections, as well as various configurationsand protocols including the Internet, World Wide Web, intranets, virtualprivate networks, wide area networks, local networks, private networksusing communication protocols proprietary to one or more companies,Ethernet, WiFi and HTTP, and various combinations of the foregoing.

In one example, computing devices 110 may be control computing devicesof an autonomous driving computing system or incorporated into vehicle100. The autonomous driving computing system may capable ofcommunicating with various components of the vehicle in order to controlthe movement of vehicle 100 according to primary vehicle control code ofmemory 130. For example, returning to FIG. 1 , computing devices 110 maybe in communication with various systems of vehicle 100, such asdeceleration system 160, acceleration system 162, steering system 164,signaling system 166, routing system 168, positioning system 170,perception system 172, and power system 174 (i.e. the vehicle's engineor motor) in order to control the movement, speed, etc. of vehicle 100in accordance with the instructions 134 of memory 130. Again, althoughthese systems are shown as external to computing devices 110, inactuality, these systems may also be incorporated into computing devices110, again as an autonomous driving computing system for controllingvehicle 100.

As an example, computing devices 110 may interact with one or moreactuators of the deceleration system 160 and/or acceleration system 162,such as brakes, accelerator pedal, and/or the engine or motor of thevehicle, in order to control the speed of the vehicle. Similarly, one ormore actuators of the steering system 164, such as a steering wheel,steering shaft, and/or pinion and rack in a rack and pinion system, maybe used by computing devices 110 in order to control the direction ofvehicle 100. For example, if vehicle 100 is configured for use on aroad, such as a car or truck, the steering system may include one ormore actuators to control the angle of wheels to turn the vehicle.Signaling system 166 may be used by computing devices 110 in order tosignal the vehicle's intent to other drivers or vehicles, for example,by lighting turn signals or brake lights when needed.

Routing system 168 may be used by computing devices 110 in order todetermine and follow a route to a location. In this regard, the routingsystem 168 and/or data 132 may store detailed map information, e.g.,highly detailed maps identifying the shape and elevation of roadways,lane lines, intersections, crosswalks, speed limits, traffic signals,buildings, signs, real time traffic information, vegetation, or othersuch objects and information.

FIG. 2 is an example of map information 200 for a section of roadwayincluding intersections 202 and 204. In this example, the mapinformation 200 includes information identifying the shape, location,and other characteristics of lane lines 210, 212, 214, traffic signallights 220, 222, crosswalk 230, sidewalks 240, stop signs 250, 252,yield sign 260, and stop line 262. Although the map information isdepicted herein as an image-based map, the map information need not beentirely image based (for example, raster). For example, the mapinformation may include one or more roadgraphs or graph networks ofinformation such as roads, lanes, intersections, and the connectionsbetween these features. Each feature may be stored as graph data and maybe associated with information such as a geographic location and whetheror not it is linked to other related features, for example, a stop signmay be linked to a road and an intersection, etc. In some examples, theassociated data may include grid-based indices of a roadgraph to allowfor efficient lookup of certain roadgraph features.

Positioning system 170 may be used by computing devices 110 in order todetermine the vehicle's relative or absolute position on a map or on theearth. For example, the position system 170 may include a GPS receiverto determine the device's latitude, longitude and/or altitude position.Other location systems such as laser-based localization systems,inertial-aided GPS, or camera-based localization may also be used toidentify the location of the vehicle. The location of the vehicle mayinclude an absolute geographical location, such as latitude, longitude,and altitude as well as relative location information, such as locationrelative to other cars immediately around it which can often bedetermined with less noise that absolute geographical location.

The positioning system 170 may also include other devices incommunication with computing devices 110, such as an accelerometer,gyroscope or another direction/speed detection device to determine thedirection and speed of the vehicle or changes thereto. By way of exampleonly, an acceleration device may determine its pitch, yaw or roll (orchanges thereto) relative to the direction of gravity or a planeperpendicular thereto. The device may also track increases or decreasesin speed and the direction of such changes. The device's provision oflocation and orientation data as set forth herein may be providedautomatically to the computing devices 110, other computing devices andcombinations of the foregoing.

The perception system 172 also includes one or more components fordetecting objects external to the vehicle such as other vehicles,obstacles in the roadway, traffic signals, signs, trees, etc. Forexample, the perception system 172 may include lasers, sonar, radar,cameras and/or any other detection devices that record data which may beprocessed by computing device 110. In the case where the vehicle is apassenger vehicle such as a minivan, the minivan may include a laser orother sensors mounted on the roof or other convenient location. Forinstance, FIG. 3 is an example external view of vehicle 100. In thisexample, roof-top housing 310 and dome housing 312 may include a lidarsensor as well as various cameras and radar units. In addition, housing320 located at the front end of vehicle 100 and housings 330, 332 on thedriver's and passenger's sides of the vehicle may each store a lidarsensor. For example, housing 330 is located in front of driver door 360.Vehicle 100 also includes housings 340, 342 for radar units and/orcameras also located on the roof of vehicle 100. Additional radar unitsand cameras (not shown) may be located at the front and rear ends ofvehicle 100 and/or on other positions along the roof or roof-top housing310.

The computing devices 110 may control the direction and speed of thevehicle by controlling various components. By way of example, computingdevices 110 may navigate the vehicle to a destination locationcompletely autonomously using data from the detailed map information androuting system 168. Computing devices 110 may use the positioning system170 to determine the vehicle's location and perception system 172 todetect and respond to objects when needed to reach the location safely.In order to do so, computing devices 110 may cause the vehicle toaccelerate (e.g., by increasing fuel or other energy provided to theengine by acceleration system 162), decelerate (e.g., by decreasing thefuel supplied to the engine, changing gears, and/or by applying brakesby deceleration system 160), change direction (e.g., by turning thefront or rear wheels of vehicle 100 by steering system 164), and signalsuch changes (e.g., by lighting turn signals of signaling system 166).Thus, the acceleration system 162 and deceleration system 160 may be apart of a drivetrain that includes various components between an engineof the vehicle and the wheels of the vehicle. Again, by controllingthese systems, computing devices 110 may also control the drivetrain ofthe vehicle in order to maneuver the vehicle autonomously.

Computing device 110 of vehicle 100 may also receive or transferinformation to and from other computing devices, such as those computingdevices that are a part of the transportation service as well as othercomputing devices. FIGS. 4 and 5 are pictorial and functional diagrams,respectively, of an example system 400 that includes a plurality ofcomputing devices 410, 420, 430, 440 and a storage system 450 connectedvia a network 460. System 400 also includes vehicle 100, and vehicles100A, 100B which may be configured the same as or similarly to vehicle100. Although only a few vehicles and computing devices are depicted forsimplicity, a typical system may include significantly more.

As shown in FIG. 4 , each of computing devices 410, 420, 430, 440 mayinclude one or more processors, memory, data and instructions. Suchprocessors, memories, data and instructions may be configured similarlyto one or more processors 120, memory 130, data 132, and instructions134 of computing device 110.

The network 460, and intervening nodes, may include variousconfigurations and protocols including short range communicationprotocols such as Bluetooth, Bluetooth LE, the Internet, World Wide Web,intranets, virtual private networks, wide area networks, local networks,private networks using communication protocols proprietary to one ormore companies, Ethernet, WiFi and HTTP, and various combinations of theforegoing. Such communication may be facilitated by any device capableof transmitting data to and from other computing devices, such as modemsand wireless interfaces.

In one example, one or more computing devices 110 may include one ormore server computing devices having a plurality of computing devices,e.g., a load balanced server farm, that exchange information withdifferent nodes of a network for the purpose of receiving, processingand transmitting the data to and from other computing devices. Forinstance, one or more computing devices 410 may include one or moreserver computing devices that are capable of communicating withcomputing device 110 of vehicle 100 or a similar computing device ofvehicle 100A as well as computing devices 420, 430, 440 via the network460. For example, vehicles 100, 100A, may be a part of a fleet ofvehicles that can be dispatched by server computing devices to variouslocations. In this regard, the server computing devices 410 may functionas a dispatching system. In addition, the vehicles of the fleet mayperiodically send the server computing devices location informationprovided by the vehicle's respective positioning systems as well asother information relating to the status of the vehicles discussedfurther below, and the one or more server computing devices may trackthe locations and status of each of the vehicles of the fleet.

In addition, server computing devices 410 may use network 460 totransmit and present information to a user, such as user 422, 432, 442on a display, such as displays 424, 434, 444 of computing devices 420,430, 440. In this regard, computing devices 420, 430, 440 may beconsidered client computing devices.

As shown in FIG. 4 , each client computing device 420, 430, 440 may be apersonal computing device intended for use by a user 422, 432, 442, andhave all of the components normally used in connection with a personalcomputing device including a one or more processors (e.g., a centralprocessing unit (CPU)), memory (e.g., RAM and internal hard drives)storing data and instructions, a display such as displays 424, 434, 444(e.g., a monitor having a screen, a touch-screen, a projector, atelevision, or other device that is operable to display information),and user input devices 426, 436, 446 (e.g., a mouse, keyboard,touchscreen or microphone). The client computing devices may alsoinclude a camera for recording video streams, speakers, a networkinterface device, and all of the components used for connecting theseelements to one another.

Although the client computing devices 420, 430, and 440 may eachcomprise a full-sized personal computing device, they may alternativelycomprise mobile computing devices capable of wirelessly exchanging datawith a server over a network such as the Internet. By way of exampleonly, client computing device 420 may be a mobile phone or a device suchas a wireless-enabled PDA, a tablet PC, a wearable computing device orsystem, or a netbook that is capable of obtaining information via theInternet or other networks. In another example, client computing device430 may be a wearable computing system, shown as a wristwatch as shownin FIG. 4 . As an example the user may input information using a smallkeyboard, a keypad, microphone, using visual signals with a camera, or atouch screen.

In some examples, client computing device 440 may be a concierge workstation used by an administrator or operator of a depot to provide depotservices for the vehicles of the fleet. Although only a single depotwork station 440 is shown in FIGS. 4 and 5 , any number of such workstations may be included in a typical system.

As with memory 130, storage system 450 can be of any type ofcomputerized storage capable of storing information accessible by theserver computing devices 410, such as a hard-drive, memory card, ROM,RAM, DVD, CD-ROM, write-capable, and read-only memories. In addition,storage system 450 may include a distributed storage system where datais stored on a plurality of different storage devices which may bephysically located at the same or different geographic locations.Storage system 450 may be connected to the computing devices via thenetwork 460 as shown in FIGS. 4 and 5 , and/or may be directly connectedto or incorporated into any of the computing devices 110, 410, 420, 430,440, etc.

Storage system 450 may store various types of information as describedin more detail below. This information may be retrieved or otherwiseaccessed by a server computing device, such as one or more servercomputing devices 410, in order to perform some or all of the featuresdescribed herein. In order to provide transportation services to users,the information of storage system 450 may include user accountinformation such as credentials (e.g., a user name and password as inthe case of a traditional single-factor authentication as well as othertypes of credentials typically used in multi-factor authentications suchas random identifiers, biometrics, etc.) that can be used to identify auser to the one or more server computing devices. The user accountinformation may also include personal information such as the user'sname, contact information, identifying information of the user's clientcomputing device (or devices if multiple devices are used with the sameuser account), one or more unique signals for the user as well as otheruser preference or settings data.

The storage system 450 may also store information which can be providedto client computing devices for display to a user. For instance, thestorage system 450 may store predetermined distance information fordetermining an area at which a vehicle is likely to stop for a givenpickup or destination location. The storage system 450 may also storegraphics, icons, and other items which may be displayed to a user asdiscussed below.

Example Methods

In addition to the operations described above and illustrated in thefigures, various operations will now be described. It should beunderstood that the following operations do not have to be performed inthe precise order described below. Rather, various steps can be handledin a different order or simultaneously, and steps may also be added oromitted.

The vehicle's computing devices may control the vehicle in order tofollow a route. This may include generating a plurality of short termtrajectories for the vehicle. These trajectories may be essentiallyfuture paths for the vehicle to follow over some brief period into thefuture, such as 2 seconds, 10 seconds, 16 seconds or more or less, inorder to follow the route to the destination. These future paths mayinclude a geometry component and a speed component or speed profile. Thespeed profile may be generated after the geometry component. In thisregard, for any given geometry, a number of different possible speedprofiles may be generated, including for instance, those that requirethe vehicle to speed up or to slow down. Again, deciding which of thesespeed profiles to use can be a challenge.

FIG. 6 is an example view of vehicle 100 being maneuvered on a sectionof roadway corresponding to the section of roadway defined in the mapinformation of FIG. 2 . For instance, FIG. 6 depicts vehicle 100 beingmaneuvered on a section of roadway 600 including intersections 602 and604. In this example, intersections 602 and 604 correspond tointersections 202 and 204 of the map information 200, respectively. Inthis example, lane lines 610, 612, and 614 correspond to the shape,location, and other characteristics of lane lines 210, 212, and 214,respectively. Similarly, crosswalk 630 corresponds to the shape,location, and other characteristics of crosswalk 230, respectively;sidewalks 640 correspond to sidewalks 240; traffic signal lights 620,622 correspond to traffic signal lights 220, 222, respectively; stopsigns 650, 652 correspond to stop signs 250, 252, respectively; yieldsign 660 corresponds to yield sign 260; and stop line 662 corresponds tostop line 262.

In this example, the computing devices 110 have used map information 200to determine a trajectory 670 for vehicle 100 to follow in order toreach a destination (not shown). Trajectory 670 includes a speedcomponent and geometry component (same as what is shown in FIG. 6 fortrajectory 670) that will require that vehicle 100 make a left turn atintersection 604.

The computing devices 100 may then attempt to determine a speed profilefor a given geometry, such as the geometry trajectory 670, thatminimizes a discomfort value for passengers or occupants of theautonomous vehicle as well as other road users in the vehicle'senvironment, including any objects identified as tailgating vehicles. Adiscomfort value may be determined based on a combination of factorsrelating to expected discomfort experienced by a passenger or occupantof the autonomous vehicle (whether or not the autonomous vehicleactually includes a passenger) and a passenger or occupant of anothervehicle (whether or not the another vehicle actually includes anyoccupant), pedestrian, or bicyclist, etc. This discomfort value may bedetermined based on a combination of factors including, for instance,maximum deceleration, maximum acceleration, maximum jerk, maximumlateral acceleration, maximum lateral jerk, maximum amount thatautonomous vehicle will exceed a speed limit whether the autonomousvehicle will have to enter a crosswalk, whether the vehicle will have toenter an occluded crosswalk, whether the vehicle's speed will surpass aproximity speed limit, minimum distance between the vehicle and anyother objects (for instance, how close together the two vehicles willcome), etc. With regard to the proximity speed limit, this maycorrespond to limiting the speed of the vehicle as a function of thedistance to a nearby object. This limit may correspond to a limit on anabsolute speed, a relative speed, a percentage of the speed limit forthe roadway on which the vehicle is currently driving, etc.

In addition to these factors, for another road user, such as anothervehicle, bicyclist or pedestrian, the factors may also include areaction time for the other road user to react to the vehicle 100, howmuch the other object will have to decelerate, when the other road userwill be able to see or detect the vehicle 100, how much the other roaduser will have to shift its position (move to the right or left), aheadway time which corresponds to an estimated reaction time for theother road user, whether another vehicle will have to enter a crosswalk,whether another road user will have to enter an occluded crosswalk,maximum amount that any other road user will need to exceed the speedlimit, as well as an uncertainty value for how confident the computingdevices are in the prediction of the other road user's position andspeed.

Each of these factors may be evaluated using a specific scale for thatvalue. For instance, the minimum acceleration (or the maximum alloweddeceleration) may range from −2 m/s2 to −8 m/s2 or more or less, maximumacceleration may range from 2 m/s2 to 3 m/s2, jerk may range from 2 m/s2to 8 m/s2 or more or less, lateral acceleration may range from 3 m/s2 to4 m/s2, exceeding the speed limit may range from 0% to 12% or more orless, proximity speed limit may range from 0% to 12% or more or less,headway may range from 0.75 seconds to 0 seconds or more or less,uncertainty may range from a standard deviation of 0.8 to a standarddeviation of 0 or more or less.

In addition, these scales may be adjusted under certain circumstances.For instance, when two vehicles are interacting, the vehicle which hasprecedence (i.e. the right of way) may be allowed or expected to behavemore assertively, whereas the vehicle which does not have precedence(i.e. does not have the right of way) may be allowed or expected tobehave more cooperatively. In that regard, the scales may be adjustedaccordingly to precedence. In this regard, the scale for the maximumallowed deceleration may be increased for a vehicle which does not haveprecedence, for instance the scale may then range from −2 m/s2 to −10m/s2 or more or less. Similarly, the scale for the maximum accelerationmay increase for a vehicle which does have precedence, for instance, thescale may then range from 2 m/s2 to 10 m/s2 or more or less.

In order to determine a speed profile for a given discomfort value, thecomputing devices may generate a plurality of constraints based on theaforementioned factors and corresponding values. For instance, theseconstraints may be generated based on objects in the vehicle'senvironment as well as their predicted behaviors or trajectories. Forinstance, constraints may include limits on velocity, such as road speedlimits and lateral acceleration limits in turns, minimum distances toother objects, slow regions (defined by map information), etc. Forexample, the computing devices 110 and/or the perception system 172 mayidentify objects such as vehicles, bicycles, pedestrians, debris, etc.and estimate one or more future predicted trajectories for thoseobjects. The constraints may be generated in order to prevent thevehicle's computing devices from determining a speed profile that wouldcause the geometry component of the trajectory (i.e. where the vehicle100 is expected to be) with the predicted trajectories of those objects.In some instances, areas corresponding to the predicted trajectories foran object may be used to determine a constraint for that object. Forexample, if a pedestrian is predicted to cross the vehicle's trajectoryat a given location, then that location and the time the pedestrian isexpected to enter and leave the vehicle's trajectory may define a speedconstraint.

In some instances, the constraints may be generated based only onobjects that are in front of and/or alongside of the vehicle. This mayinclude, for instance, only those vehicles that are in front of and/oralongside of the vehicle and that also have predicted trajectories thatare likely to cross with the trajectory of the vehicle. In that regard,objects behind the vehicle may be ignored. However, in some instances,objects behind the vehicle, such as tailgating vehicles, may actually berelevant to determining a speed plan for the vehicle. As such, thecomputing devices 110 may determine that an object is a tailgatingvehicle if that object meets a plurality of requirements. For instance,these plurality of requirements may include that the object isidentified as a vehicle that the object is located behind the vehicleand in the same lane as the vehicle, that the object is traveling acertain speed relative to the speed of the vehicle 100, that the objectis within a certain distance behind the vehicle, etc. In this regard,for any object located in a lane behind the vehicle 100, the computingdevices 110 may determine whether that object is a tailgating vehicle.This assessment may be updated periodically, for instance, such as everytime the computing devices 110 receive updated sensor data from theperception system 172.

Similarly, when an object located behind the vehicle is determined to bea tailgating vehicle, a constraint may also be generated for thatobject. However, the values used for a constraint for a tailgatingvehicle may be different than those for a typical vehicle. For instance,for a tailgating vehicle, the computing devices 110 may assume agreater, in terms of more braking and/or less reaction time, response tothe actions of the vehicle 100 than for other types of vehicles. Inother words, a tailgating vehicle is more likely to slow down for thevehicle 100 than other vehicles as the vehicle 100 would be unlikely tobe expected to react strongly to a tailgating vehicle behind the vehicle100 as the tailgating vehicle would be expected to react for the vehicle100.

The computing devices may determine whether there is a solution (i.e. aspeed profile) that will satisfy or meet a maximum allowable discomfortvalue and satisfy the values for all of the constraints. For instance,for a given maximum allowable discomfort value, the computing devices110 may return a speed profile for that maximum allowable discomfortvalue or a failure if within the limits of that maximum allowablediscomfort value no solution can be found. This results in the computingdevices choosing a speed plan with the lowest feasible maximum allowablediscomfort value.

For situations with no constraints to consider, for instance, such asthe example of FIG. 6 , the computing devices may be able to find aspeed profile at the lowest maximum allowable discomfort value andtherefore would not need to evaluate higher maximum allowable discomfortvalues. In other words, where there are no other road users such asvehicles, bicyclists, or pedestrians proximate to the vehicle 100, thecomputing devices 110 will typically be able to find a speed profilethat meets an initial or the lowest maximum allowable discomfort value,for instance zero discomfort.

When the vehicle 100's trajectory comes close to other such road users,such as vehicles or pedestrians, the vehicle should be controlled atslower speeds for safety reasons. Accordingly, the desired speed may bea function of the type of other road user (for instance, vehicle,bicyclist, or pedestrian) and how close the vehicle 100 can get to thatother object. By increasing the maximum allowable discomfort values, thevehicle 100 may even be allowed to exceed the desired speed slightly toavoid a collision with such other road users.

The computing devices may search for speed profiles iteratively usingdifferent maximum allowable discomfort values. For instance, thecomputing devices start with a first and lowest maximum allowablediscomfort value, such as zero. If the computing devices are unable tofind a speed profile at that maximum allowable discomfort value, thecomputing devices may increase the maximum allowable discomfort valueuntil a solution is found. For instance, the maximum allowablediscomfort value may be increased from 0 by increments of 0.1, 0.2,0.25, 0.5, or more or less, until the maximum allowable discomfort valuereaches some absolute maximum value, such as 0.5, 1, 2, 10 or more orless. In the example of increments of 0.25 and a maximum value of 1,there would be 5 discrete levels, although additional or differentlevels, increments, and absolute maximum values may also be used.

Each time the maximum allowable discomfort is increased, so too, thevalues for the various factors of each constraint may be adjusted. Forinstance, for a typical vehicle, the reaction delay at 0 discomfort maybe expected to be 2 seconds, whereas for a tailgating vehicle, thereaction delay may be expected to be 1.5 seconds. At a discomfort valueof 1, for a typical vehicle, the reaction delay may be expected to be1.5 seconds and for a tailgating vehicle, the reaction delay may beexpected to be 0 seconds. As another example, at a discomfort value of0, the maximum allowed deceleration for a tailgating vehicle may be −2m/s/s, and at a discomfort value of 1, the maximum allowed decelerationfor a tailgating vehicle may be −8 m/s/s. For a typical vehicle, at adiscomfort value of 0 the maximum allowed deceleration may be −1 m/s/s,and at a discomfort value of 1, the maximum allowed deceleration may be−6 m/s/s. In the event that the typical vehicle has precedence (asdiscussed above), at a discomfort value of 1, the maximum alloweddeceleration may be −4 m/s/s.

For each given maximum allowable discomfort value, the vehicle'scomputing devices may start with an initial speed profile that moves asfast as possible given one or more constraints.

This initial profile may not necessarily satisfy all of the constraintsfor all of the other objects, including tailgating vehicles. Thoseconstraints are resolved one by one. If the computing devices determineone of the constraints is violated, the computing devices attempt toyield to the object relating to that constraint by slowing the speedprofile down. When slowing the speed profile down, the computing devicesmay make the vehicle deceleration (or brake) as late as possible andspeed up again as soon as possible after the constraint. Thus, the speedprofile is still moving as fast as possible while satisfying theconstraint. This is important because as long as computing devicesunderstand that the speed profiles are always moving as fast aspossible, slowing the speed profile down is the only option to make theprofile satisfy a violated constraint. If the computing devices are ableto slow down the speed profile and satisfy the constraint, the computingdevices repeat the process with the next violated constraint until allconstraints are satisfied. If the computing devices can't satisfy theconstraints even when braking as hard and as early as possible, themaximum allowable discomfort value may be increased and new speedprofiles generated. However, if the speed profile can either pass oryield to another vehicle at the given maximum allowable discomfortvalue, the computing devices may select a default action, such asspeeding up to pass the other object.

The computing device may then control the vehicle according to the speedprofile that meets the smallest maximum allowable discomfort value. Iffor a given maximum allowable discomfort value the vehicle may use speedprofiles for either passing or yielding, the vehicle's computing devicesmay choose the speed profile for passing with the highest speed. Thisspeed profile may then be used in combination with the geometrycomponent to control the vehicle.

The discomfort value may be used when generating all speed profiles, butcan be especially useful when the autonomous vehicle in certain types ofsituation which requires that the autonomous vehicle either speed up orslow down while interacting with another vehicle. These situations mayinclude making a right turn in front of or behind another vehicle,merging in front of or behind another vehicle, crossing the path of aanother vehicle in front of or behind the other vehicle, and so on.Again, by using the discomfort values, such decisions may be madeautomatically rather than by requiring the computing devices to make aspecific choice and thereafter determining a speed plan.

In the example of the right turn, the computing devices may need todecide between a speed profile that includes speeding up to allow thevehicle to turn in front of the other vehicle and a speed profile thatincludes decreasing speed to allow the vehicle yield to the othervehicle. For instance, turning to FIG. 7 , vehicle 100 must make a rightturn at intersection 604 in order to follow trajectory 710. Differentspeed profiles may cause vehicle 100 to pass in front of or behindvehicle 720. For instance, if the speed profile causes the vehicle tomove along the trajectory immediately, for example, increasing itsspeed, the vehicle 100 may pass in front of vehicle 720. Similarly, ifthe speed profile causes the vehicle to wait or move very slowly, thevehicle 100 may pass behind the vehicle 720. By using a maximumallowable discomfort value as described above, such decisions may bemade automatically, by considering discomfort to passenger or occupantsof both vehicle 100 and vehicle 720, rather than by requiring thecomputing devices to make a specific choice and thereafter determining aspeed plan.

Similarly in the example of a merge, the computing devices may need todecide between a speed profile that includes increasing speed to getover in front of the other vehicle and a speed profile that includesdecreasing speed to get over behind the other vehicle. For instance,turning to FIG. 8 , vehicle 100 must merge into traffic in order tofollow trajectory 810. Different speed profiles may cause vehicle 100 tomerge in front of or behind vehicle 820. For instance, if the speedprofile causes the vehicle to move along the trajectory immediately, forexample, increasing its speed, the vehicle 100 may merge in front ofvehicle 820. Similarly, if the speed profile causes the vehicle to waitor move very slowly, the vehicle 100 may merge behind the vehicle 820.Again, by using a maximum allowable discomfort value as described above,such decisions may be made automatically, by considering discomfort topassenger or occupants of both vehicle 100 and vehicle 820, rather thanby requiring the computing devices to make a specific choice andthereafter determining a speed plan.

And again, in the example of crossing the path of another vehicle, thecomputing devices may need to decide between a speed profile thatincludes increasing speed to cross over the path of the other vehiclebefore the in front of that vehicle and a speed profile that includesdecreasing speed to cross the path of the other vehicle after thevehicle behind the other vehicle. For instance, turning to FIG. 9 ,vehicle 100 must proceed straight through intersection 604 in order tofollow trajectory 910. Different speed profiles may cause vehicle 100 topass in front of or behind vehicle 920. For instance, if the speedprofile causes the vehicle to move along the trajectory immediately, forexample, increasing its speed, the vehicle 100 may cross the path ofvehicle 920 in front of vehicle 920. Similarly, if the speed profilecauses the vehicle to wait or move very slowly, the vehicle 100 maycross the path of vehicle 920 behind the vehicle 920. Again, by using amaximum allowable discomfort value as described above, such decisionsmay be made automatically, by considering discomfort to passenger oroccupants of both vehicle 100 and vehicle 920, rather than by requiringthe computing devices to make a specific choice and thereafterdetermining a speed plan.

As the discomfort value increases, certain constraints may be “phasedout” or their values may be such that they do not affect the speedprofile in order to allow the vehicle to disregard or ignore theconstraint. This behavior may enable the computing devices 110 toessentially make tradeoffs between which constraints are more importantthan others. As such, tailgating vehicles may also affect the behaviorof the vehicle, for instance, by causing the computing devices 110 toadjust or even ignore some constraints. For instance, if the vehicle 100is approaching an intersection, a tailgating vehicle may indirectlycause the computing devices 110 to adjust a constraint related tostopping at a stop line for the intersection because the tailgater isnot decelerating fast enough or at all.

For example, turning to FIG. 10 , vehicle 100 is approachingintersection 602 and following trajectory 1010 through intersection 602.At this point, a traffic light controlling the lane in which vehicle 100is located is red or is yellow (i.e. is about to turn red). As such,computing devices 110 may need to stop vehicle 100 at the intersection602. In addition, vehicle 1020 is behind vehicle 100 and in the samelane as vehicle 100. In this example, the computing devices 110 maydetermine that vehicle 1020 is a tailgating vehicle as discussed above.As such, the computing devices 110 may adjust the constraint forstopping at the stop line 662, for instance, by moving a location of theconstraint to a few feet beyond the stop line. Alternatively, thecomputing devices 110 may simply ignore the constraint completely. Byadjusting or ignoring, the computing devices 110 may cause the vehicle100 to stop a few feet past the stop line 662 or to move forward a fewfeet into intersection 602 in order to avoid being hit (i.e. rear-ended)by the tailgating vehicle 1020. Of course, the vehicle 100 may notnecessarily disregard its own safety or that of others by running a stopsign or passing through an intersection while traffic light controllingthe lane in which vehicle 100 is located is red or about to turn red.For instance, to ensure safety with respect to cross-traffic, movinginto the intersection may only be allowed while a traffic lightcontrolling the lane in which vehicle 100 is located is still yellow(i.e. the light has not yet turned red).

With regard to the uncertainty factor, in some circumstances for lowermaximum allowable discomfort values, the vehicle's computing devices mayadjust the vehicle's behavior to proceed more cautiously. For instance,at lower maximum allowable discomfort values, the computing devices mayapply a “buffer” constraint around other objects future states thatrepresents an uncertainty about their future trajectory. As an example,this buffer constraint may be generated such that there is a 60% or moreor less likelihood that the other object will stay within the inflatedconstraint. For higher maximum allowable discomfort values, this bufferconstraint may be reduced.

FIG. 11 includes an example flow diagram 1100 of some of the examplesfor controlling a first vehicle, such as vehicle 100, which may beperformed by one or more processors such as processors 120 of computingdevices 110. For instance, at block 1110, while maneuvering the firstvehicle in an autonomous driving mode, a second vehicle is identified.At block 1120, geometry for a future trajectory of the first vehicle isreceived. At block 1130, an initial allowable discomfort value isidentified. At block 1140, determining a speed profile for the geometrythat meets the initial allowable discomfort value is attempted based ona set of factors relating to at least discomfort of a passenger oroccupant of the first vehicle and discomfort of a passenger or occupantof the second vehicle. At block 1150, when a speed profile that meetsthe initial allowable discomfort value cannot be determined, the initialallowable discomfort value is adjusted until a speed profile that meetsan adjusted allowable discomfort value is determined. At block 1160, thespeed profile that meets the adjusted allowable discomfort value is usedto control the vehicle in the autonomous driving mode.

FIG. 12 includes an example flow diagram 1200 of some of the examplesfor controlling a first vehicle, such as vehicle 100, which may beperformed by one or more processors such as processors 120 of computingdevices 110. At block 1210, while the vehicle is maneuvered in theautonomous driving mode, a second vehicle is identified. At block 1220,the second vehicle is determined to be a tailgating vehicle. An initialallowable discomfort value representing expected discomfort of anoccupant of the first vehicle and expected discomfort of an occupant ofthe second vehicle is determined at block 1230. At block 1240,determining a speed profile that meets the initial allowable discomfortvalue is attempted based on a set of factors corresponding to a reactionof the second vehicle. At block 1250, when a speed profile that meetsthe initial allowable discomfort value cannot be determined, the initialallowable discomfort value is adjusted until a speed profile that meetsan adjusted allowable discomfort value is determined. At block 1260, thespeed profile that meets the adjusted allowable discomfort value is usedto control the first vehicle in the autonomous driving mode.

Unless otherwise stated, the foregoing alternative examples are notmutually exclusive, but may be implemented in various combinations toachieve unique advantages. As these and other variations andcombinations of the features discussed above can be utilized withoutdeparting from the subject matter defined by the claims, the foregoingdescription of the embodiments should be taken by way of illustrationrather than by way of limitation of the subject matter defined by theclaims. In addition, the provision of the examples described herein, aswell as clauses phrased as “such as,” “including” and the like, shouldnot be interpreted as limiting the subject matter of the claims to thespecific examples; rather, the examples are intended to illustrate onlyone of many possible embodiments. Further, the same reference numbers indifferent drawings can identify the same or similar elements.

The invention claimed is:
 1. A method of controlling a first vehicle,the method comprising: while maneuvering the first vehicle in anautonomous driving mode, identifying, by one or more processors, asecond vehicle as a tailgating vehicle; identifying, by the one or moreprocessors, an initial allowable discomfort value; attempting, by theone or more processors, to determine a speed profile for a futuretrajectory of the first vehicle that meets the initial allowablediscomfort, value based on the tailgating vehicle; when a speed profilethat meets the initial allowable discomfort value cannot be determined,adjusting, by the one or more processors, the initial allowablediscomfort value until a speed profile that meets an adjusted allowablediscomfort value is determined; and using, by the one or moreprocessors, the speed profile that meets the adjusted allowablediscomfort value to control the first vehicle in the autonomous drivingmode.
 2. The method of claim 1, wherein the initial allowable discomfortvalue represents expected discomfort of an occupant of the first vehicleand expected discomfort of an occupant of the second vehicle.
 3. Themethod of claim 1, wherein the initial allowable discomfort value isbased on a set of factors corresponding to a reaction of the tailgatingvehicle.
 4. The method of claim 3, wherein the set of factors includes amaximum allowed deceleration for the second vehicle.
 5. The method ofclaim 4, further comprising, when the initial allowable discomfort valueis adjusted, the maximum allowed deceleration for the second vehicle isalso adjusted.
 6. The method of claim 5, wherein adjusting the maximumallowed deceleration includes increasing a limit on expecteddeceleration for the second vehicle.
 7. The method of claim 3, whereinthe set of factors includes a reaction time for the second vehicle. 8.The method of claim 7, further comprising, when the initial allowablediscomfort value is adjusted, the reaction time for the second vehicleis also adjusted.
 9. The method of claim 3, wherein the set of factorsfurther includes a constraint for stopping the first vehicle at anintersection.
 10. The method of claim 9, wherein when the initialallowable discomfort value is adjusted, the constraint for stopping thefirst vehicle at the intersection is adjusted.
 11. The method of claim9, wherein when the initial allowable discomfort value is adjusted, theconstraint for stopping the first vehicle at the intersection isignored.
 12. The method of claim 11, wherein the constraint for stoppingthe first vehicle at the intersection is ignored when the tailgatingvehicle is not decelerating.
 13. The method of claim 11, whereinignoring the constraint allows the first vehicle to move into theintersection to avoid being hit by the second vehicle.
 14. The method ofclaim 13, wherein moving into the intersection is allowed while atraffic light controlling a lane in which the first vehicle is locatedis green or yellow.
 15. The method of claim 3, further comprising: whilemaneuvering the first vehicle in an autonomous driving mode,identifying, by one or more processors, a third vehicle; and determine,by the one or more processors, that the third vehicle is not atailgating vehicle, and wherein attempting to determine the speedprofile for the future trajectory that meets the initial allowablediscomfort value is further based on a second set of factors relating tothe third vehicle.
 16. The method of claim 15, wherein the set offactors includes a first value for a maximum allowed deceleration forthe second vehicle, and the second set of factors includes a secondvalue for the maximum allowed deceleration for the third vehicle, andthe second value is different from the first value.
 17. The method ofclaim 16, wherein the first value allows for a first limit on expecteddeceleration for the second vehicle, the second value allows for asecond limit on expected deceleration for the third vehicle, and thefirst limit is less than the second limit.
 18. The method of claim 15,wherein the set of factors includes a first value for a reaction timefor the second vehicle, and the second set of factors includes a secondvalue for the reaction time for the third vehicle, and the second valueis different from the first value.
 19. A system for controlling a firstvehicle, the system comprising one or more processors configured to:while maneuvering the first vehicle in an autonomous driving mode,identify a second vehicle as a tailgating vehicle; identify an initialallowable discomfort value; attempt to determine a speed profile for afuture trajectory of the first vehicle that meets the initial allowablediscomfort value based on the tailgating vehicle; when a speed profilethat meets the initial allowable discomfort value cannot be determined,adjust the initial allowable discomfort value until a speed profile thatmeets an adjusted allowable discomfort value is determined; and use thespeed profile that meets the adjusted allowable discomfort value tocontrol the first vehicle in the autonomous driving mode.
 20. The systemof claim 19, wherein the one or more processors are further configuredto: while maneuvering the first vehicle in an autonomous driving mode,identify a third vehicle; and determining that the third vehicle is nota tailgating vehicle, and wherein attempting to determine the speedprofile for the future trajectory that meets the initial allowablediscomfort value is based on a set of factors corresponding to areaction of the tailgating vehicle and a second set of factors relatingto the third vehicle, the set of factors includes a first value for amaximum allowed deceleration for the second vehicle, the second set offactors includes a second value for the maximum allowed deceleration forthe third vehicle, and the second value is different from the firstvalue.